Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

400
Visualizações
Set yaml.schema "kubernetes" for autocompletion with nvim-lspconfig

i try to get kubernetes auto completion going in nvim. I am using neovim nightly (0.5.) with 'neovim-lspconfig' and 'nvim-lua/completion-nvim'. I installed the yaml-language-sever and it is working fine (i know it is working because it is showing errors inside yaml files in nvim).

I am fairly new to lua and nvim-lsp, it might just be a syntax error. I try to configure the server with this lua code:

local lspconfig = require'lspconfig'
lspconfig.yamlls.setup{
    on_attach = require'completion'.on_attach,
    settings = {
        yaml.schemas = { kubernetes = "globPattern" },
    }
}

I tried thousand different ways to write it but i always get Errors like:

Error loading lua [string ":lua"]:5: '}' expected (to close '{' at line 4) near '='

The documentation just says to add server configs via the settings key. But i am not quite sure how.

Anybody got this going? Thanks a lot.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You should change it to

lspconfig.yamlls.setup{
    settings = {
        yaml = {
           schemas = { kubernetes = "globPattern" },
      }
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda